From d0d72e60f5fe2debf862cb2c3455777c240c5dcc Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 29 Nov 2019 17:10:00 +0100 Subject: [PATCH] x86: fix clang .macro retention check MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There were two problems here: The first closing parentheses got parsed by make to end the $(call invocation, and the escaping of the quotes wasn't right either, as there's nowhere they would get un-escaped. Furthermore there appears to be a puzzling problem with \n getting expanded to an actual newline too early in some environments. Convert these to semicolons at the same time. Signed-off-by: Jan Beulich Tested-by: Roger Pau Monné [On FreeBSD and Debian 9.5] Reviewed-by: Roger Pau Monné Acked-by: Andrew Cooper --- Config.mk | 2 ++ xen/arch/x86/Rules.mk | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index 0fa4591379..4735a1bfd0 100644 --- a/Config.mk +++ b/Config.mk @@ -6,6 +6,8 @@ endif # Convenient variables comma := , +open := ( +close := ) squote := ' #' Balancing squote, to help syntax highlighting empty := diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index 659ac3d83e..0794afa3c3 100644 --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -81,6 +81,6 @@ $(call as-option-add,CFLAGS,CC,".include \"asm/indirect_thunk_asm.h\"",,\ # Check whether clang keeps .macro-s between asm()-s: # https://bugs.llvm.org/show_bug.cgi?id=36110 $(call as-option-add,CFLAGS,CC,\ - ".macro FOO\n.endm\"); asm volatile (\".macro FOO\n.endm",\ + ".macro FOO;.endm"$$(close); asm volatile $$(open)".macro FOO;.endm",\ -no-integrated-as) endif -- 2.30.2